package com.zy.dateTest;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

@SpringBootTest
public class test {

    @Test
    public void test(){
        String s1 = "Tue Dec 11 2018 00:00:00 GMT+0800 (中国标准时间)";
        String s2="191107410023";
        System.out.println(s2.substring(6,12));
        System.out.println(s1.substring(10,15)+"年"+s1.substring(4,7)+"月"+s1.substring(8,10)+"日");
    }
}
